package com.huawei.fastengine.fastview.startFastappEngine.appmarket;

import com.huawei.fastengine.fastview.download.utils.log.FastViewLogUtils;

public class QueryDetailHanlderRegister {
    private static final String TAG = "QueryDHRegister";
    private static Class<?> handlerCls;

    public static IQueryDetailHandler getHandler() {
        try {
            if (handlerCls != null) {
                return (IQueryDetailHandler) handlerCls.newInstance();
            }
        } catch (InstantiationException e) {
            FastViewLogUtils.d(TAG, "getHandler InstantiationException:");
        } catch (IllegalAccessException e2) {
            FastViewLogUtils.d(TAG, "getHandler IllegalAccessException:");
        }
        return null;
    }

    public static void registerHanlder(Class<? extends IQueryDetailHandler> cls) {
        handlerCls = cls;
    }
}
